namespace SmartMathLibrary
{
    /// <summary>
    /// Interface to implement a TrigonometricPolynomialComponent class.
    /// </summary>
    public interface ITrigonometricPolynomialComponent
    {
        /// <summary>
        /// Gets or sets the first coefficient of the trigonometric polynomial component.
        /// </summary>
        /// <value>The first coefficient of the trigonometric polynomial component.</value>
        double A { get; set; }

        /// <summary>
        /// Gets or sets the second coefficient of the trigonometric polynomial component.
        /// </summary>
        /// <value>The second coefficient of the trigonometric polynomial component.</value>
        double B { get; set; }

        /// <summary>
        /// Solves the component at the specified position x.
        /// </summary>
        /// <param name="x">The value for evaluation.</param>
        /// <param name="k">The index of the component in the whole trigonometric polynomial.</param>
        /// <returns>The result t(x) at the specified position x.</returns>
        double SolveAt(double x, int k);

        /// <summary>
        /// Copies the current instance.
        /// </summary>
        /// <returns>A copy of the current instance.</returns>
        TrigonometricPolynomialComponent Copy();

        /// <summary>
        /// Compares the current instance of a component to another one.
        /// </summary>
        /// <param name="compare">The component to compare.</param>
        /// <returns>True if the components are even otherwise, false.</returns>
        bool CompareTo(TrigonometricPolynomialComponent compare);

        /// <summary>
        /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <param name="k">The index of the component in the whole trigonometric polynomial.</param>
        /// <returns>
        /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </returns>
        string ToString(int k);
    }
}